﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bymed.SpineScan.DataModel
{
    public abstract class TestItemBase
    {
        public string TestItemName { get; protected set; }
        public Position TestPosition { get; protected set; }  // This property is used by ScoliosisATITest ONLY.
        public int FirstResult { get; protected set; }
        public int SecondResult { get; protected set; }
        public string ResultRawData { get; protected set; }
        public IList<double> Graph { get; protected set; }
        protected string TestMessagePattern;

        public enum Position
        {
            Thoracic = 1,
            Lumbar = 2
        }

        public TestItemBase(string testMessage)
        {
            ResultRawData = testMessage;
            GetTestResult();
        }

        /// <summary>
        /// Get the test result by using specified pattern from the test message comes from device.
        /// </summary>
        protected abstract void GetTestResult();
    }
}
